package com.boc.ewr.risk.controller;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.boc.ewr.bcimp.entity.CassTlrMsg;
import com.boc.ewr.risk.entity.CaUnpriaccUnusual;
import com.boc.ewr.risk.entity.vo.CacSameMobCusmNoVo;
import com.boc.ewr.risk.service.ICaUnpriaccUnusualService;
import com.boc.ewr.risk.service.ICassEmpMismatchService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.jeecg.common.api.vo.Result;
import org.jeecg.common.system.base.controller.JeecgController;
import org.jeecg.common.system.query.QueryGenerator;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.servlet.ModelAndView;

import javax.servlet.http.HttpServletRequest;

/**
 * @author : Wzz
 * @create : 2023-06- 07- 10:49
 * @desc :
 */
@Api(tags="角色管理不符清单")
@RestController
@RequestMapping("/risk/cassEmpMismatch")
@Slf4j
public class CassEmpMismatchController  extends JeecgController<CassTlrMsg, ICassEmpMismatchService> {

    @Autowired
    private ICassEmpMismatchService cassEmpMismatchService;

    /**
     * 分页列表查询
     *
     * @param cassTlrMsg
     * @param pageNo
     * @param pageSize
     * @param req
     * @return
     */
    //@AutoLog(value = "角色管理不符清单-分页列表查询")
    @ApiOperation(value="角色管理不符清单-分页列表查询", notes="角色管理不符清单-分页列表查询")
    @GetMapping(value = "/list")
    public Result<IPage<CassTlrMsg>> queryPageList(CassTlrMsg cassTlrMsg,
                                                          @RequestParam(name="pageNo", defaultValue="1") Integer pageNo,
                                                          @RequestParam(name="pageSize", defaultValue="10") Integer pageSize,
                                                          HttpServletRequest req) {
        cassEmpMismatchService.genTlrMsgWrong();

//        Page<CaUnpriaccUnusual> page = new Page<CaUnpriaccUnusual>(pageNo, pageSize);
//        page.setRecords();
//        IPage<CassTlrMsg> cassTlrMsgIPage = page;

//        return Result.OK(cassTlrMsgIPage);
        return Result.OK();
    }

    /**
     * 导出excel
     *
     * @param request
     * @param cassTlrMsg
     */
    @RequestMapping(value = "/exportXls")
    public ModelAndView exportXls(HttpServletRequest request, CassTlrMsg cassTlrMsg) {
        return super.exportXls(request, cassTlrMsg, CassTlrMsg.class, "角色管理不符清单");
    }

}
